package services;

import domain.entities.Equipmentcertification;
import domain.entities.MiembroBms;

/**
 * Created with IntelliJ IDEA.
 * User: Guillermo
 * Date: 22/11/12
 * Time: 12:41
 * To change this template use File | Settings | File Templates.
 */
public class CriteriaEquipmentcertification extends Criteria{

    private Equipmentcertification equipmentcertification;

    public CriteriaEquipmentcertification(Equipmentcertification equipmentcertification) {
        this.equipmentcertification = equipmentcertification;
    }

    @Override
    public boolean isIn(Object element){
        boolean isIn = true;

        Equipmentcertification other = (Equipmentcertification)element;

        isIn &= isSubstring(equipmentcertification.getCentro().getId(),other.getCentro().getId());
        isIn &= isSubstring(equipmentcertification.getEquipmentType().getId(),other.getEquipmentType().getId());
        return isIn;
    }
}
